@echo off
echo Checking for pygame installation...

python -c "import pygame; print('pygame ' + pygame.version.ver + ' is already installed')" 2>nul
if %errorlevel% == 0 (
    echo pygame is already installed.
) else (
    echo pygame not found. Installing...
    pip install pygame
    if %errorlevel% == 0 (
        echo pygame installation complete.
    ) else (
        echo pygame installation failed.
    )
)

echo.
echo Checking for pathfinding installation...

python -c "from pathfinding.core.grid import Grid; print('pathfinding library is already installed')" 2>nul
if %errorlevel% == 0 (
    echo pathfinding library is already installed.
) else (
    echo pathfinding library not found. Installing...
    pip install pathfinding
    if %errorlevel% == 0 (
        echo pathfinding installation complete.
    ) else (
        echo pathfinding installation failed.
    )
)

echo.
echo All dependencies check complete!
echo You can now run the game using run.bat
pause